package _10压缩变换;


import java.util.HashSet;
import java.util.HashSet;
import java.util.Scanner;

public class _10压缩变换1 {

	static HashSet<Integer> set = new HashSet<>();

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] a = new int[n+1];
		int[] b = new int[n+1];
		int[] pre = new int[n+1];


		for(int i=1;i<=n;i++) {
			a[i] = in.nextInt();
			int j=i-1;
			while(j>0 && a[j]!=a[i])
				j--;
			pre[i] = j;
		}

		for(int i=1;i<=n;i++) {
			if(pre[i]==0)
				b[i] = -a[i];
			else {
				set.clear();
				for(int j=pre[i]+1;j<i;j++)
					set.add(a[j]);
				b[i] = set.size();
			}
		}
		for(int i=1;i<=n;i++)
			if(i!=n)
				System.out.print(b[i]+" ");
			else
				System.out.println(b[i]);

	}

}
